 import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/home',
            component: resolve => require(['../components/common/Home.vue'], resolve),
            children:[
                {
                    path: '/',
                    component: resolve => require(['../components/common/BaseForm.vue'], resolve)
                },
                {
                    path: '/basetable',
                    component: resolve => require(['../components/common/BaseTable.vue'], resolve)
                },
                {
                    path: '/vuetable',
                    component: resolve => require(['../components/common/VueTable.vue'], resolve)     // vue-datasource组件
                },
                {
                    path: '/baseform',
                    component: resolve => require(['../components/common/BaseForm.vue'], resolve)
                },
                {
                    path: '/vueeditor',
                    component: resolve => require(['../components/common/VueEditor.vue'], resolve)    // Vue-Quill-Editor组件
                },
                {
                    path: '/markdown',
                    component: resolve => require(['../components/common/Markdown.vue'], resolve)     // Vue-Quill-Editor组件
                },
                {
                    path: '/upload',
                    component: resolve => require(['../components/common/Upload.vue'], resolve)       // Vue-Core-Image-Upload组件
                },
                {
                    path: '/basecharts',
                    component: resolve => require(['../components/common/BaseCharts.vue'], resolve)   // vue-echarts-v3组件
                },
                {
                    path: '/mixcharts',
                    component: resolve => require(['../components/common/MixCharts.vue'], resolve)    // vue-echarts-v3组件
                },
                {
                    path: '/indexbanner',
                    component: resolve => require(['../components/page/indexbanner.vue'], resolve)    // vue-echarts-v3组件
                }
                ,
                {
                    path: '/gamebanner',
                    component: resolve => require(['../components/page/gamebanner.vue'], resolve)    // vue-echarts-v3组件
                }
                ,
                {
                    path:'/adminlist',
                    component: resolve => require(['../components/page/adminList.vue'], resolve)    // vue-echarts-v3组件
                }
                ,
                {
                    path:'/orderlist',
                    component: resolve => require(['../components/page/orderList.vue'], resolve)    // vue-echarts-v3组件
                }
                ,
                {
                    path: '/gamemanage',
                    component: resolve => require(['../components/page/gamemanage.vue'], resolve)    // vue-echarts-v3组件
                },
                {
                    path: '/enrollmanage',
                    component: resolve => require(['../components/page/enrollmanage.vue'], resolve)    // vue-echarts-v3组件
                },
                {
                    path: '/playermanage',
                    component: resolve => require(['../components/page/playermanage.vue'], resolve)    // vue-echarts-v3组件
                }
                ,
                {
                    path: '/nopassmanage',
                    component: resolve => require(['../components/page/nopassmanage.vue'], resolve)    // vue-echarts-v3组件
                }
                ,
                {
                    path:'/regionManage',
                    component: resolve => require(['../components/page/regionManage.vue'], resolve)    // vue-echarts-v3组件
                }
                ,
                {
                    path:'/cityManage',
                    component: resolve => require(['../components/page/cityManage.vue'], resolve)    // vue-echarts-v3组件
                }
                ,
                {
                    path:'/areaManage',
                    component: resolve => require(['../components/page/areaManage.vue'], resolve)    // vue-echarts-v3组件
                }
                ,
                {
                    path:'/settingmanage',
                    component: resolve => require(['../components/page/settingmanage.vue'], resolve)    // vue-echarts-v3组件
                }
                ,
                {
                    path:'/indeximg',
                    component: resolve => require(['../components/page/indeximg.vue'], resolve)    // vue-echarts-v3组件
                }
            ]
        },
        {
            path: '/login',
            component: resolve => require(['../components/page/Login.vue'], resolve)
        },
    ]
})
